//仓库选择
{
  selectData: function({ form, data, view }) {
    if (data) {
      const d = JSON.parse(JSON.stringify(data));
      form.warehouseName = d.warehouse;
      form.warehouseCode = d.warehouseCode;
      form.fctCode = d.fctCode
    }
  }
}

//子库选择
{
  selectData: function({ form, data, view }) {
    if (data) {
      const d = JSON.parse(JSON.stringify(data));
      form.zwarehouseName = d.zwarehouse;
    }
  }
}

//库区选择
{
  selectData: function({ form, data, view }) {
    if (data) {
      const d = JSON.parse(JSON.stringify(data));
      form.zwarehouseCode = d.zwarehouseCode;
      form.warehouseName = d.warehouseName;
      form.factoryCode = d.factoryCode;
      form.warehouseCode = d.warehouseCode;
    }
  }
}

//厅店选择
{
  selectData: function({ form, data, view }) {
    if (data) {
      const d = JSON.parse(JSON.stringify(data));
      form.storeCode = d.storeCode;
      form.store = d.store;
      form.customerCd = d.customerCd;
      form.customer = d.customer;
    }
  }
}

//表格选择器传参
{
  viewKey: "getpackmatrial",
    query: {
    isPackaging: 1
  },
  queryKey: {
    factoryCode: 'factoryCode'
  }
}

created() {
  this.query.status = 0;
},
methods: {
  searchChange(params, done) {
    this.query = params;
    this.query.status = 0;
    this.onLoad(this.page, params, done);
  },
  searchReset() {
    this.query = { status: 0 };
    this.onLoad(this.page);
  },